﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace space_scavenger
{
    class GameScreen : Screen
    {
        List<Entity> entities;

        public override void Init()
        {
            Texture2D blackbox = base.Manager.Content.Load<Texture2D>("Textures/blackbox");
            entities = new List<Entity>();
            entities.Add(new Player(new Vector2(),new Vector2(),new Rectangle(),blackbox,10,10,10,10));
        }

        public override void Update(GameTime gameTime)
        {
            
            foreach (Entity e in entities)
            {
                e.Update(base.Manager.InputState, gameTime);
            }
        }

        public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            
            Manager.GraphicsDevice.Clear(Color.CornflowerBlue);
            foreach (Entity e in entities)
            {
                e.Draw(spriteBatch, gameTime);
            }
        }

    }
}
